TARGET = tst-ht
PREFIX_BIN =

CC = gcc

INCLUDES = 
LIBS = 
CPPFLAGS = 
CFLAGS =-Wall -pipe
LINKFLAGS =

C_SOURCES = $(wildcard *.c)
C_OBJS = $(patsubst %.c, %.o, $(C_SOURCES))
#C_OBJS = main.o

.c.o:
	$(CC) -c -o $*.o $(CPPFLAGS) $(CFLAGS) $(INCLUDES) $*.c

compile: $(C_OBJS)
	$(CC)  $(LINKFLAGS) -o $(TARGET) $^ $(LIBS)

debug:
	make CPPFLAGS="$(CPPFLAGS) -DPLEX_DEBUG" CFLAGS="$(CFLAGS) -g" LINKFLAGS="" compile

best:
	make CPPFLAGS="$(CPPFLAGS) -DNDEBUG"  CFLAGS="$(CFLAGS) -fomit-frame-pointer -march=pentium4" LINKFLAGS="" compile

clean:
	rm -f $(C_OBJS)
	rm -f $(TARGET)

install: $(TARGET)
	cp $(TARGET) $(PREFIX_BIN)

uninstall:
	rm -f $(PREFIX_BIN)/$(TARGET)

rebuild: clean compile 

